import { createStore, applyMiddleware } from "redux"
import thunk from "redux-thunk"
import { reducer } from "./reducer"

// 创建store（ 传入的reducer函数会自动执行）
// const store = createStore(reducer)
const store = createStore(reducer, applyMiddleware(thunk))

// 导出
export { store }